Building GstRTMPMetadata project

From RidgeRun Developer Wiki

Follow Us On Twitter LinkedIn Email Share this page






NVIDIA partner logo NXP partner logo




Building GStreamer with RTMP Metadata Support

The support is delivered as a set of patches organized by GStreamer version.

Meson & Ninja

The project uses the Meson build system together with Ninja as backend.

sudo apt install python3 python3-pip python3-setuptools python3-wheel ninja-build
sudo -H pip3 install meson

Building the project

For GStreamer 1.20 and newer

Clone the official GStreamer repository and checkout the stable branch:

git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd gstreamer
git checkout x.xx.x (ej. 1.20.7)

Apply our custom patches:

git am -3 path/to/your/patches/*.patch

For GStreamer 1.16.x

For GStreamer 1.16.x you will need to use a different branch and URL.

Use the following commands:

git clone https://github.com/GStreamer/gst-build
cd gstreamer
git checkout 1.16

Then apply the RidgeRun RTMP metadata support patches for 1.16.x.

cd subprojects/gst-plugins-base
git am -3 path/to/0001.patch

cd ../gst-plugins-good
git am -3 path/to/0002.patch

Continuing from here

The following steps apply to both builds (1.16.x and 1.20+).

Now configure the build in the root with Meson:

meson setup builddir \
   --reconfigure \
   -Dtests=disabled \
   -Dexamples=disabled \
   -Dgtk_doc=disabled

Enter the Meson development environment:

meson -C builddir

Finally, build the plugin and selected elements:

ninja -C builddir

Warning: If you prefer to install system-wide, use `ninja -C builddir install`, but this may replace your existing GStreamer installation.

Testing with devenv

After building, use the development environment to test without installing:

meson devenv -C builddir
gst-inspect-1.0 flvmux

Configuration Options

These are general GStreamer configuration options that may be useful during the build process:

Configure Option Description
-Dexamples=disabled Skip compiling example applications
-Dtests=disabled Skip test suite build
-Dgtk_doc=disabled Disable documentation generation
--prefix=/usr Define installation path

Table 1. Example Meson configuration options

Checking the Features

After building, you can confirm that the patched FLV elements expose the new properties and signals. For the FLV Mux:

gst-inspect-1.0 flvmux

Expected output should include:

Element Properties: 
  meta-binary         : Binary metadata (GBytes)
                        flags: readable, writable
                        Boxed pointer of type "GBytes"
  meta-string         : Custom string to include as metadata
                        flags: readable, writable
                        String. Default: null
  metadatacreator     : The value of metadatacreator in the meta packet.
                        flags: readable, writable
                        String. Default: "GStreamer 1.20.7.1 FLV muxer"

For the FLV Demux:

gst-inspect-1.0 flvdemux

Expected output should include:

Element Properties:
  attach-flvmeta      : Attach custom onMetaData (meta-*) as GstFlvMeta to first audio a
nd video buffers
                        flags: readable, writable
                        Boolean. Default: false
  flv-meta-signal     : Emit a signal carrying custom onMetaData (meta-*) payload as GBy
tes